// 切换助战为主登陆角色和队长 {"助战编号":1}
// @ts-ignore
export async function execute(client_id, message_json) {
    let id = message_json["id"];
    let login_characters = G.Characters.get_current_login_characters(client_id);
    let help_fight = G.HelpFight.get_help_fight_list(client_id);
    for (let index = 0; index < help_fight.length; index++) {
        let help_fight_characters = help_fight[index];
        if (help_fight_characters["id"] === id) {
            let characters = _CharactersData.get(help_fight_characters["id"]);
            if (characters !== undefined && characters["id"] !== login_characters["id"]) {
                //重新登陆
                G.Characters.reset_master_login(client_id, characters);
                ClientUtils.send_basic_prompt(client_id, `#Y已切换助战#G${characters["名称"]}#Y为主角色`);
            }
        }
    }
}